GdkSurfaceTypeHint
GdkSurfaceState
gdk_surface_new_toplevel
+gdk_surface_new_temp
gdk_surface_new_popup
-gdk_surface_new_child
gdk_surface_destroy
gdk_surface_get_surface_type
gdk_surface_get_display
<para>
The gdk_window_new() function has been replaced by a number of more
specialized constructors: gdk_surface_new_toplevel(), gdk_surface_new_popup(),
- gdk_surface_new_temp(), gdk_surface_new_child(), gdk_surface_new_input(),
- gdk_wayland_surface_new_subsurface(). Use the appropriate ones to create
- your windows.
+ gdk_surface_new_temp(), gdk_wayland_surface_new_subsurface().
+ Use the appropriate ones to create your windows.
</para>
<para>
Native and foreign subwindows are no longer supported. These concepts were
g_assert (mv_resize->moveresize_emulation_surface == NULL);
- mv_resize->moveresize_emulation_surface = gdk_surface_new_popup (mv_resize->display, &rect);
+ mv_resize->moveresize_emulation_surface = gdk_surface_new_temp (mv_resize->display, &rect);
gdk_surface_show (mv_resize->moveresize_emulation_surface);
static GdkSurface *
gdk_surface_new (GdkDisplay *display,
GdkSurfaceType surface_type,
+ GdkSurface *parent,
int x,
int y,
int width,
gdk_surface_set_frame_clock (surface, frame_clock);
g_object_unref (frame_clock);
- gdk_display_create_surface_impl (display, surface, NULL);
+ gdk_display_create_surface_impl (display, surface, parent);
surface->impl_surface = surface;
g_signal_connect (display, "seat-removed", G_CALLBACK (seat_removed_cb), surface);
* @width: width of new surface
* @height: height of new surface
*
- * Creates a new toplevel surface. The surface will be managed by the surface
- * manager.
+ * Creates a new toplevel surface.
*
* Returns: (transfer full): the new #GdkSurface
**/
{
g_return_val_if_fail (GDK_IS_DISPLAY (display), NULL);
- return gdk_surface_new (display, GDK_SURFACE_TOPLEVEL, 0, 0, width, height);
+ return gdk_surface_new (display, GDK_SURFACE_TOPLEVEL,
+ NULL, 0, 0, width, height);
}
/**
- * gdk_surface_new_popup: (constructor)
+ * gdk_surface_new_temp: (constructor)
* @display: the display to create the surface on
* @position: position of the surface on screen
*
- * Creates a new toplevel popup surface. The surface will bypass surface
- * management.
+ * Creates a new temporary surface.
+ * The surface will bypass surface management.
*
* Returns: (transfer full): the new #GdkSurface
**/
GdkSurface *
-gdk_surface_new_popup (GdkDisplay *display,
- const GdkRectangle *position)
+gdk_surface_new_temp (GdkDisplay *display,
+ const GdkRectangle *position)
{
g_return_val_if_fail (GDK_IS_DISPLAY (display), NULL);
g_return_val_if_fail (position != NULL, NULL);
return gdk_surface_new (display, GDK_SURFACE_TEMP,
+ NULL,
position->x, position->y,
position->width, position->height);
}
/**
- * gdk_surface_new_popup_full: (constructor)
+ * gdk_surface_new_popup: (constructor)
* @display: the display to create the surface on
* @parent: the parent surface to attach the surface to
*
* Returns: (transfer full): a new #GdkSurface
*/
GdkSurface *
-gdk_surface_new_popup_full (GdkDisplay *display,
- GdkSurface *parent)
+gdk_surface_new_popup (GdkDisplay *display,
+ GdkSurface *parent)
{
GdkSurface *surface;
g_return_val_if_fail (GDK_IS_DISPLAY (display), NULL);
g_return_val_if_fail (GDK_IS_SURFACE (parent), NULL);
- surface = gdk_surface_new (display, GDK_SURFACE_TEMP, 0, 0, 100, 100);
+ surface = gdk_surface_new (display, GDK_SURFACE_TEMP,
+ NULL, 0, 0, 100, 100);
+
gdk_surface_set_transient_for (surface, parent);
gdk_surface_set_type_hint (surface, GDK_SURFACE_TYPE_HINT_MENU);
typedef enum
{
GDK_SURFACE_TOPLEVEL,
- GDK_SURFACE_TEMP
+ GDK_SURFACE_TEMP,
} GdkSurfaceType;
/* Size restriction enumeration.
int width,
int height);
GDK_AVAILABLE_IN_ALL
-GdkSurface * gdk_surface_new_popup (GdkDisplay *display,
+GdkSurface * gdk_surface_new_temp (GdkDisplay *display,
const GdkRectangle *position);
GDK_AVAILABLE_IN_ALL
-GdkSurface * gdk_surface_new_popup_full (GdkDisplay *display,
+GdkSurface * gdk_surface_new_popup (GdkDisplay *display,
GdkSurface *parent);
GDK_AVAILABLE_IN_ALL
{
GdkSurface *surface;
- surface = gdk_surface_new_popup (display, &(GdkRectangle) { 0, 0, 100, 100 });
+ surface = gdk_surface_new_temp (display, &(GdkRectangle) { 0, 0, 100, 100 });
gdk_surface_set_type_hint (surface, GDK_SURFACE_TYPE_HINT_DND);
ndevices, ncursors));
#endif
/* Create a dummy window to receive wintab events */
- wintab_window = gdk_surface_new_popup (display, &(GdkRectangle) { -100, -100, 2, 2 });
+ wintab_window = gdk_surface_new_temp (display, &(GdkRectangle) { -100, -100, 2, 2 });
g_object_ref (wintab_window);
for (devix = 0; devix < ndevices; devix++)
{
GdkSurface *surface;
- surface = gdk_surface_new_popup (display, &(GdkRectangle) { 0, 0, 100, 100 });
+ surface = gdk_surface_new_temp (display, &(GdkRectangle) { 0, 0, 100, 100 });
gdk_surface_set_type_hint (surface, GDK_SURFACE_TYPE_HINT_DND);
{
GdkRectangle rect = { -100, -100, 1, 1 };
- display_x11->leader_gdk_surface = gdk_surface_new_popup (display, &rect);
+ display_x11->leader_gdk_surface = gdk_surface_new_temp (display, &rect);
}
(_gdk_x11_surface_get_toplevel (display_x11->leader_gdk_surface))->is_leader = TRUE;
{
GdkSurface *surface;
- surface = gdk_surface_new_popup (display, &(GdkRectangle) { 0, 0, 100, 100 });
+ surface = gdk_surface_new_temp (display, &(GdkRectangle) { 0, 0, 100, 100 });
gdk_surface_set_type_hint (surface, GDK_SURFACE_TYPE_HINT_DND);
display = gdk_surface_get_display (surface);
- ipc_surface = gdk_surface_new_popup (display, &(GdkRectangle) { -99, -99, 1, 1 });
+ ipc_surface = gdk_surface_new_temp (display, &(GdkRectangle) { -99, -99, 1, 1 });
drag = (GdkDrag *) g_object_new (GDK_TYPE_X11_DRAG,
"surface", ipc_surface,
g_assert (mv_resize->moveresize_emulation_surface == NULL);
- mv_resize->moveresize_emulation_surface = gdk_surface_new_popup (mv_resize->display, &rect);
+ mv_resize->moveresize_emulation_surface = gdk_surface_new_temp (mv_resize->display, &rect);
gdk_surface_show (mv_resize->moveresize_emulation_surface);
status = gdk_seat_grab (gdk_device_get_seat (mv_resize->device),
if (!surface)
{
GdkRectangle rect = { -100, -100, 1, 1 };
- surface = gdk_surface_new_popup (gtk_widget_get_display (GTK_WIDGET (menu)), &rect);
+ surface = gdk_surface_new_temp (gtk_widget_get_display (GTK_WIDGET (menu)), &rect);
gdk_surface_show (surface);
display = gtk_widget_get_display (priv->relative_to);
- priv->surface = gdk_surface_new_popup_full (display, gtk_widget_get_surface (priv->relative_to));
+ priv->surface = gdk_surface_new_popup (display, gtk_widget_get_surface (priv->relative_to));
gtk_widget_set_surface (widget, priv->surface);
gdk_surface_set_widget (priv->surface, widget);
allocation.height);
break;
case GTK_WINDOW_POPUP:
- surface = gdk_surface_new_popup (gtk_widget_get_display (widget), &allocation);
+ surface = gdk_surface_new_temp (gtk_widget_get_display (widget), &allocation);
break;
default:
g_error (G_STRLOC": Unknown window type %d!", priv->type);
instance = G_OBJECT (g_object_ref (gtk_settings_get_default ()));
else if (g_type_is_a (type, GDK_TYPE_SURFACE))
{
- instance = G_OBJECT (g_object_ref (gdk_surface_new_popup (display,
+ instance = G_OBJECT (g_object_ref (gdk_surface_new_temp (display,
&(GdkRectangle) { 0, 0, 100, 100 })));
}
else if (g_type_is_a (type, GTK_TYPE_FILTER_LIST_MODEL))
instance = G_OBJECT (g_object_ref (gtk_settings_get_default ()));
else if (g_type_is_a (type, GDK_TYPE_SURFACE))
{
- instance = G_OBJECT (g_object_ref (gdk_surface_new_popup (display,
+ instance = G_OBJECT (g_object_ref (gdk_surface_new_temp (display,
&(GdkRectangle) { 0, 0, 100, 100 })));
}
else if (g_str_equal (g_type_name (type), "GdkX11Cursor"))